package group2assignone.model;

/**
 * Models a Flight
 * @author group2
 */
public class Flight{

    private String flightNum;
    private String depLoc;
    private String arrLoc;
    private String depTime;
    private String arrTime;
    private int seatCap;
    private int remSeats;
    private int seatsBooked;
    private String date;
    private String cost;
    private int promotion;

    /**
     * initialises variables to zero
     */
    public Flight() {
        flightNum = "";
        depLoc = "";
        arrLoc = "";
        depTime = "";
        arrTime = "";
        seatCap = 0;
        seatsBooked = 0;
        date = "";
        cost = "";
    }

    /**
     * getter for flight number
     * @return flight number
     */
    public String getFlightNum() {
        return flightNum;
    }

    /**
     * setter for flight number
     * @param s
     */
    public void setFlightNum(String s) {
        flightNum = s;
    }

    /**
     * getter for departure location
     * @return departure location
     */
    public String getDepLoc() {
        return depLoc;
    }

    /**
     * setter for departure location
     * @param s
     */
    public void setDepLoc(String s) {
        depLoc = s;
    }

    /**
     * getter for arrival locatoin
     * @return arrival location
     */
    public String getArrLoc() {
        return arrLoc;
    }

    /**
     * setter for arrival location
     * @param s
     */
    public void setArrLoc(String s) {
        arrLoc = s;
    }

    /**
     * getter for departure time
     * @return departure time
     */
    public String getDepTime() {
        return depTime;
    }

    /**
     * setter for departure time
     * @param s
     */
    public void setDepTime(String s) {
        depTime = s;
    }

    /**
     * getter for arrival time
     * @return arrival time
     */
    public String getArrTime() {
        return arrTime;
    }

    /**
     * setter for arrival time
     * @param s
     */
    public void setArrTime(String s) {
        arrTime = s;
    }

    /**
     * getter for seat capacity
     * @return seat capacity
     */
    public int getSeatCap() {
        return seatCap;
    }



    /**
     * setter for seat capacity
     * @param s
     */
    public void setSeatCap(int s) {
        seatCap = s;
    }

    /**
     * getter for flight date
     * @return date
     */
    public String getDate() {
        return date;
    }

    /**
     * setter for flight date
     * @param s
     */
    public void setDate(String s) {
        date = s;
    }

    /**
     * getter for flight cost
     * @return cost
     */
    public String getCost() {
        return cost;
    }

    /**
     * setter for flight cost
     * @param s
     */
    public void setCost(String s) {
        cost = s;
    }

    /**
     * @return the remaining seats
     */
    public int getRemSeats() {
        remSeats = seatCap - seatsBooked;
        return remSeats;
    }

    /**
     * @return the promotion
     */
    public int getPromotion() {
        return promotion;
    }

    /**
     * @param promotion the promotion to set
     */
    public void setPromotion(int promotion) {
        this.promotion = promotion;
    }
}
